package lanou3g.myfirstapp36kr.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import lanou3g.myfirstapp36kr.fragment.FragmentMoneyviewPagerFragment;

/**
 * Created by dllo on 16/8/3.
 */
public class FragmentMoneyViewPagerAdapter extends FragmentPagerAdapter {
    private String [] strs = {"https://rong.36kr.com/api/mobi/cf/actions/list?page=1&type=all&pageSize=20"
            ,"https://rong.36kr.com/api/mobi/cf/actions/list?page=1&type=underway&pageSize=20"
            ,
            "https://rong.36kr.com/api/mobi/cf/actions/list?page=1&type=raise&pageSize=20"
            ,"https://rong.36kr.com/api/mobi/cf/actions/list?page=1&type=finish&pageSize=20"};
    public FragmentMoneyViewPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return FragmentMoneyviewPagerFragment.newInstance(strs[position]);
    }

    @Override
    public int getCount() {
        return titles.length;
    }
    private String [] titles = {"全部","募资中","募资完成","融资成功"};

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}
